From: Ray Strode Date: Thu, 4 Apr 2013 20:12:31 +0000 (-0400) Subject: background: don't leak background objects during quick changes X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~4368 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=9eae74357ab4af94f473c3b0e29be37c19b2d145;p=gnome-shell.git background: don't leak background objects during quick changes We currently let some backgrounds "fall through the cracks" if a bunch of change notifications come in at once. This commit fixes that. https://bugzilla.gnome.org/show_bug.cgi?id=697395 --- diff --git a/js/ui/background.js b/js/ui/background.js index 88c79e225..4994c05a3 100644 --- a/js/ui/background.js +++ b/js/ui/background.js @@ -742,11 +742,15 @@ const BackgroundManager = new Lang.Class({ time: FADE_ANIMATION_TIME, transition: 'easeOutQuad', onComplete: Lang.bind(this, function() { - if (this.background == background) { + if (this._newBackground == newBackground) { this.background = newBackground; this._newBackground = null; - background.actor.destroy(); + } else { + newBackground.actor.destroy(); } + + background.actor.destroy(); + this.emit('changed'); }) });